//
//  AppDelegate.m
//  somenew
//
//  Created by Koby5 on 12/19/12.
//  Copyright (c) 2012 Koby5. All rights reserved.
//

#import "AppDelegate.h"

#import "ViewController.h"
#import "GalleryViewController.h"
#import "ServiceViewController.h"

@implementation AppDelegate

- (void)dealloc
{
    [_window release];
    [_viewController release];
    [super dealloc];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    
    [[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
    
    /*ListView*/
    ViewController *navigationController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:navigationController];
    
    /*Gallery*/
    UIViewController *galleryViewController = [[[GalleryViewController alloc] initWithNibName:@"GalleryViewController" bundle:nil] autorelease];
    
    /*Services*/
    UIViewController *serviceViewController = [[[ServiceViewController alloc] initWithNibName:@"ServiceViewController" bundle:nil] autorelease];
    
    self.tabBarController = [[[UITabBarController alloc]init]autorelease];
    
    self.tabBarController.viewControllers = [NSArray arrayWithObjects:nav, galleryViewController, serviceViewController, nil];
    
    self.window.rootViewController = self.tabBarController;
    
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{

}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{

}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    
}

@end
